import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'


const app = createApp(App)
app.use(ElementPlus)

app.use(store).use(router).mount('#app')


 app.directive('stripe', {
            mounted(el, binding) {
                const index = binding.value;
                
                // 根据索引设置背景色
                if (index % 2 === 0) {
                    // 偶数行 - 浅蓝色
                    el.style.backgroundColor = '#e3f2fd';
                    // el.style.borderLeft = '4px solid #2196f3';
                } else {
                    // 奇数行 - 浅绿色
                    el.style.backgroundColor = '#e8f5e9';
                    // el.style.borderLeft = '4px solid #4caf50';
                }
            }
   });
